from __future__ import annotations
from airflow.decorators import dag, task
import pendulum
@dag(
    dag_id="collect_info",
    schedule_interval=None,
    start_date=pendulum.datetime(2024, 4, 13, tz="Asia/Shanghai"),
    catchup=False,
    tags=["collect_info"],
)
def collect_info_dag():
     # [START]
    @task(task_id="print_the_context")
    def print_context(ds=None, **kwargs):
        import sys
        import os
        import logging
        logger = logging.getLogger(__name__)
        logger.info("===========================")
        logger.info(kwargs)
        logger.info(ds)
        logger.info(sys.path)
        logger.info(os.environ)
        logger.info("==========================")
    
    run_this = print_context()
    return "Whatever you return gets printed in the logs"

collect_info_dag()